var Oname = document.getElementById("name");
var Opass = document.getElementById("pass");
var Obtn = document.getElementById("btn");
Obtn.onclick = function(){
    $.get("http://jx.xuzhixiang.top/ap/api/reg.php", {
        username: Oname.value,
        password: Opass.value
    }, data => {
        console.log(data.code);
        console.log(data.msg);
        if(data.code == 0){
            alert(data.msg+",请从新注册！");
        }
        if(data.code == 1){
            alert(data.msg+"，请重新登录！");
        }
    })
}